#coding=utf-8
from flask import Flask
from flask import request

from carPred import predict

app = Flask(__name__)

@app.route('/car/scan/code', methods=['POST','GET'])
def verifyCarImg():
    app.logger.debug('info log')
    if request.method == 'POST':
        return str(predict(request.form.get("img")))
    else:
        return "请使用post请求"

if __name__ == '__main__':
  app.run(host='0.0.0.0',port=5002,debug=False)